#include <iostream>

#include "main_module.h"

namespace {

}

int MainModule::Run()
{
	const LexerError res = m_lexer.GenerateTokenStream();
	if (res.code != LexerErrorCode::SUCCESS)
	{	
		std::cout << res.message;
		return 1;
	}

	if (!m_parser.GenerateAST(m_lexer.GetTokenStream()))
	{
		std::cout << "Fail to parse token stream\n";
		return 1;
	}

	return 0;
}